﻿using System;

namespace JH
{
    /// <summary>
    ///  注入资产使用的特性,必须配合[<see cref="UnityEngine.SerializeField"/>]使用
    /// </summary>
    [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
    public class InjectAssetAttribute : Attribute
    {
        /// <summary>
        ///  资产名称
        /// </summary>
        public string Name { get; }

        /// <summary>
        ///  该特性用于标记一个需要注入的资产
        /// </summary>
        public InjectAssetAttribute(string name = null)
        {
            Name = name;
        }
    }
}